<template>
	<a-table :columns="columns" :data-source="tableData" :pagination="false"
		:scroll="{ x: '80%', y: TABLE_SCROLL_HEIGHT }" rowKey="id" >
	</a-table>
</template>

<script lang="ts" setup>
	import { ref, computed } from "vue";
	import useGetTableScrollHeight from "@/utils/useGetTableScrollHeight";
	
	defineProps({
		tableData: {
			type: Array,
			default() {
				return [];
			},
		},
	});
	const EMITS = defineEmits(["operation"]);
	const TABLE_SCROLL_HEIGHT = useGetTableScrollHeight();
	
	const columns = [
		{ title: "事件类型", dataIndex: "businessType", ellipsis: true, },
		{ title: "事件详情", dataIndex: "jsonResult", ellipsis: true, },
		{ title: "操作人", dataIndex: "operName", ellipsis: true, },
		{ title: "操作时间", dataIndex: "operTime", ellipsis: true, },
		{ title: "IP地址", dataIndex: "operIp", ellipsis: true, },
	];
	
</script>

<style>
</style>